package com.haiyou.dc.es.service.impl;

import com.haiyou.common.base.AbstractBaseService;
import com.haiyou.dc.es.constant.EsConstant;
import com.haiyou.dc.es.entity.EsSupportAddress;
import com.haiyou.dc.es.mapper.EsSupportAddressMapper;
import com.haiyou.dc.es.service.EsSupportAddressService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author root
 * @date 2020-01-20 18:05:59
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class EsSupportAddressServiceImpl extends AbstractBaseService<EsSupportAddressMapper, EsSupportAddress> implements EsSupportAddressService {

    @Override
    public EsSupportAddress getAddress(String enName, String level) {
        EsSupportAddress esSupportAddress = this.selectOne(new EsSupportAddress()
                .setEnName(enName)
                .setLevel(level));
        return esSupportAddress;
    }
}